#ifndef PICKINGRAY_H
#define PICKINGRAY_H

#include <QVector3D>
#include <QVector>
#include "Object3D.h"

class Object3D;

class PickingRay
{
    QVector3D clickPosInWorld;
    QVector3D direction;
    QVector3D lookAt;
    QVector3D eye;
    QVector3D view;
    QVector3D up;
    QVector3D screenHorizontally;
    QVector3D screenVertically;

public:
    PickingRay();    

    void picking(float screenX, float screenY, float viewportWidth, float viewportHeight, float viewAngle, float nearClippingDistance);
    void setVectors(float eyeX, float eyeY, float eyeZ, float centerX, float centerY, float centerZ, float upX, float upY, float upZ);
    Object3D* throwRay(QVector<Object3D*> objectsInScene);
    QVector3D intersectionWithXyPlane();
    QVector3D getClickPosInWorld();
    QVector3D getDirection();


};

#endif // PICKINGRAY_H
